import { Message, Loading } from 'element-ui'

let loading
export const loadOpen = function (opts) {
  loading = Loading.service({
    lock: true,
    text: 'Loading',
    spinner: 'el-icon-loading'
  })
}

export const loadClose = function () {
  loading.close()
}

export const alertMessage = function (message) {
  Message.error(message)
}
